home *** CD-ROM | disk | FTP | other *** search
- /* PEEK.C --- p. 647 */
- #include <stdio.h>
- #include <dos.h>
- main()
- {
- unsigned seg, off;
- printf("Enter address (SSSS:0000) of memory \n"
- "location whose contents you want to get: ");
- scanf(" %x:%x", &seg, &off);
- /* Use 'peek to get contents of that location */
- printf("The word at %X:%X contains %x\n", seg, off, peek(seg, off));
- }